package com.mrptech.mess.model;

// Generated Feb 15, 2015 10:58:50 PM by Hibernate Tools 4.0.0

import java.math.BigDecimal;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * UserThresholds generated by hbm2java
 */
@Entity
@Table(name = "USER_THRESHOLDS")
public class UserThresholds implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private UserThresholdsId id;
	private Users users;
	private String thresholdCategory;
	private BigDecimal thresholdValue;

	public UserThresholds() {
	}

	public UserThresholds(UserThresholdsId id, Users users) {
		this.id = id;
		this.users = users;
	}

	public UserThresholds(UserThresholdsId id, Users users,
			String thresholdCategory, BigDecimal thresholdValue) {
		this.id = id;
		this.users = users;
		this.thresholdCategory = thresholdCategory;
		this.thresholdValue = thresholdValue;
	}

	@EmbeddedId
	@AttributeOverrides({
			@AttributeOverride(name = "thresholdId", column = @Column(name = "THRESHOLD_ID", nullable = false, precision = 22, scale = 0)),
			@AttributeOverride(name = "accountId", column = @Column(name = "ACCOUNT_ID", nullable = false, precision = 22, scale = 0)) })
	public UserThresholdsId getId() {
		return this.id;
	}

	public void setId(UserThresholdsId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ACCOUNT_ID", nullable = false, insertable = false, updatable = false)
	public Users getUsers() {
		return this.users;
	}

	public void setUsers(Users users) {
		this.users = users;
	}

	@Column(name = "THRESHOLD_CATEGORY", length = 30)
	public String getThresholdCategory() {
		return this.thresholdCategory;
	}

	public void setThresholdCategory(String thresholdCategory) {
		this.thresholdCategory = thresholdCategory;
	}

	@Column(name = "THRESHOLD_ VALUE", precision = 22, scale = 0)
	public BigDecimal getThresholdValue() {
		return this.thresholdValue;
	}

	public void setThresholdValue(BigDecimal thresholdValue) {
		this.thresholdValue = thresholdValue;
	}

}
